<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML>
<html>
	<head>
		<base href="<%=basePath%>">

		<title></title>
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>jslib/bootstrap/css/bootstrap.css">
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>css/theme.css">
		<link rel="stylesheet"
			href="<%=basePath%>jslib/font-awesome/css/font-awesome.css">
		<script src="<%=basePath%>jslib/jquery-1.7.2.min.js"
			type="text/javascript"></script>
	</head>
	<body class="content1">
		<div class="header">
			<h1 class="page-title">
				抵押经理管理
			</h1>
		</div>
		<ul class="breadcrumb">
			<li>
				<a>Home</a>
				<span class="divider">/</span>
			</li>
			<li class="active">
				贷款申请列表
			</li>
		</ul>
		<div class="container-fluid">
			<div class="row-fluid">
				<form class="form-inline" method="post" action="applicationsearch">
					<input class="input-xlarge" placeholder="姓名..." name="aptTrueName"
						type="text" value="${param.aptTrueName}">
					<input class="btn icon-search" type="submit" value="查询" />
<!-- 					<a class="btn btn-primary" href="product/add"> -->
<!-- 						<i class="icon-plus"></i> 新增XXX -->
<!-- 					</a> -->
				</form>

				<div class="well">
					<table class="table">
						<thead>
							<tr>
								<th>
									申请单号
								</th>
								<th>
									申请人姓名
								</th>
								<th>
									申请时间
								</th>
								<th>
									受理状态
								</th>
								<th>
									申请金额
								</th>
								<th>
									购买车辆标价
								</th>
								<th>
									汽车
								</th>
								<th>
									抵押审核
								</th>
								<th style="width: 90px;">
									操作
								</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${pi.list}" var="item">
								<tr>
									<td>
										${item.aptId}
									</td>
									<td>
										${item.aptTrueName}
									</td>
									<td>
										${item.aptTime}
									</td>
									<td>
										${item.aptStatus}
									</td>
									<td>
										${item.aptAmount} 
									</td>
									<td>
										${item.aptBuyCar}
									</td>
									<td>
										${item.aptCar}
									</td>
									<td>
										<c:choose>
											<c:when test="${item.aptDysh==\"0\"}">
												<p style="color:red;">审核中</p>		
											</c:when>
											<c:otherwise><p style="color:green;">通过审核</p></c:otherwise>
										</c:choose>
									</td>
									<td>
										<a href="<%=basePath%>applicationedit?aptId=${item.aptId}">处理</a>
										&nbsp;
										<a href="<%=basePath%>applicationdelete?aptId=${item.aptId}">删除</a>
									</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
					<div class="page-info">
						<span>当前第${pi.current }页/共${pi.count }条/${pi.total }页</span>		
						<c:if test="${pi.current gt 1 }">
							<a href="<%=basePath%>applicationlist?current=1">首页</a>
							<a href="<%=basePath%>applicationlist?current=${pi.current - 1 }">上一页</a>
						</c:if>
						 <c:forEach begin="1" step="1"
								end="${pi.total}" var="index">
								
									<c:if test="${pi.current ==index}" var="t">
										<a style="color: red; background-color: #bbb">${index}</a>
									</c:if>
									<c:if test="${!t}">
										<a href="<%=basePath%>applicationlist?current=${index}">${index}</a>
									</c:if>
								
							     </c:forEach>
						
						<c:if test="${pi.current lt pi.total }">
							<a href="<%=basePath%>applicationlist?current=${pi.current + 1 }">下一页</a>
							<a href="<%=basePath%>applicationlist?current=${pi.total }">尾页</a>
						</c:if>
				   </div> 
				</div>  
			</div>
		</div>
	</body>
</html>
